<template>
  <div class="animation-box">
    aaa
  </div>

</template>

<script>
  export default {
    name: 'search',
    props:['model']
  }
</script>

<style scoped>
.animation-box{
  margin: auto;
  width: 400px;
  height:400px;
  background-color: lightskyblue;
  animation-name: example;
  animation-duration: 1s;
}

.animation-box:hover{
  background-color: red;
  animation-name: example2;
  animation-duration: 1s;
  margin-top: 10px; 
  margin-bottom: -10px;
}

/* 动画代码 */
@keyframes example {
  from {background-color: red; }
  to {background-color: lightskyblue; }
}

@keyframes example2 {
  0% {background-color: lightskyblue;}
  50%  {background-color: yellow; margin-top: 5px; margin-bottom: -5px;}
  100% {background-color: red; margin-top: 10px; margin-bottom: -10px;}
}



</style>